package org.bee.tl.ext.spring;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpSession;

/**
 * wrap session as Map,so beetl can access it 
 * @author joelli
 * @since 1.1
 *
 */
public class SessionWrapper implements Map {
	HttpSession session  = null;
	public SessionWrapper(HttpSession session){
		this.session = session ;
	
	}
	
	public void clear() {
		throw new UnsupportedOperationException();
		
	}

	public boolean containsKey(Object key) {
		throw new UnsupportedOperationException();
	}

	public boolean containsValue(Object value) {
		throw new UnsupportedOperationException();
	}

	public Set<java.util.Map.Entry> entrySet() {
		throw new UnsupportedOperationException();
	}

	public Object get(Object key) {
		return session.getAttribute((String)key);
	}

	public boolean isEmpty() {
		throw new UnsupportedOperationException();
	}

	public Set keySet() {
		throw new UnsupportedOperationException();
	}

	public Object put(Object key, Object value) {
		throw new UnsupportedOperationException();
	}

	public void putAll(Map  m) {
		throw new UnsupportedOperationException();
		
	}

	public Object remove(Object key) {
		throw new UnsupportedOperationException();
	}

	public int size() {
		throw new UnsupportedOperationException();
	}

	public Collection values() {
		throw new UnsupportedOperationException();
	}

}
